package com.foreknow.demo10;

/**
 * @author shkstart
 * @create 2021-07-29 14:49
 */
public class Person {
    private int age;
    String name;

    public Person(int age, String name) {
        this.age = age;
        this.name = name;
    }

    public Person() {
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static void main(String[] args) {
        Person p1=new Person(20,"tom");
        Person p2=new Person(20,"tom");
        System.out.println(p1==p2);
        System.out.println(p1.equals(p2));
    }
}
